package com.ruubypay.web.common.code;

/**
 * Desc : 示例{"resData":"{"userID":""}","resCode":"0000","resMessage":"成功"}
 * @author sucyun
 * Date : 2018/3/12 下午4:10
 */
public class ResultEntity<T> {
    private T resData;

    private String resCode;

    private String resMessage;

    public ResultEntity(){
    }
    public ResultEntity(ResultCode resultCode){
        this.setResCode(resultCode.getCode());
        this.setResMessage(resultCode.getMsg());
    }

    public T getResData() {
        return resData;
    }

    public void setResData(T resData) {
        this.resData = resData;
    }

    public String getResCode() {
        return resCode;
    }

    public void setResCode(String resCode) {
        this.resCode = resCode;
    }

    public String getResMessage() {
        return resMessage;
    }

    public void setResMessage(String resMessage) {
        this.resMessage = resMessage;
    }

    public  void setCodeMsg(ResultCode resultCode){
        this.setResCode(resultCode.getCode());
        this.setResMessage(resultCode.getMsg());
    }
}
